package com.masterclient.app.modules.income.adapter;

import android.content.Context;
import android.widget.ImageView;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;
import com.eoner.baselibrary.utils.ScreenUtils;
import com.eoner.baselibrary.utils.ViewTransformUtil;
import com.masterclient.app.R;
import com.masterclient.app.modules.income.model.UnClearAccountBean;
import jp.wasabeef.glide.transformations.RoundedCornersTransformation;

public class ClearAccountImageAdapter extends BaseQuickAdapter<UnClearAccountBean.GoodsBean.ImageBean, BaseViewHolder> {

    private Context mContext;

    public ClearAccountImageAdapter(Context context) {
        super(R.layout.item_image_clear_account);
        mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder helper, UnClearAccountBean.GoodsBean.ImageBean item) {

        ImageView image = helper.getView(R.id.image);
        ViewTransformUtil.glideImageView(mContext, item.image, image,
                new RoundedCornersTransformation(ScreenUtils.dp2px(3), 0),
                R.mipmap.defaults, ScreenUtils.dp2px(54), ScreenUtils.dp2px(54));
    }
}
